home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / ColorSync 2.1.2 GM / Interfaces / AIncludes / CMAcceleration.a next >
Encoding:
Text File  |  1997-02-18  |  4.3 KB  |  120 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMAcceleration.a
  3. ;
  4. ;    Contains:    ColorSync 2.0 Acceleration Component Interfaces
  5. ;
  6. ;    Version:    ColorSync 2.1
  7. ;
  8. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.
  9. ;                All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__CMACCELERATION__') = 'UNDEFINED' THEN
  19. __CMACCELERATION__ SET 1
  20.  
  21.     IF &TYPE('__MEMORY__') = 'UNDEFINED' THEN
  22.     include 'Memory.a'
  23.     ENDIF
  24.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  25.     include 'Components.a'
  26.     ENDIF
  27.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  28.     include 'CMApplication.a'
  29.     ENDIF
  30.  
  31. ;  –––––––––––––––––––––––––––––––––––––– version info 
  32.  
  33. cmAccelerationInterfaceVersion    EQU        1
  34. ;  –––––––––––––––––––––––––––––––––––––– Component Type 
  35.  
  36. cmAccelerationComponentType        EQU        'csac'
  37. ;  –––––––––––––––––––––––––––––––––––––– Required Component function selectors 
  38.  
  39. cmLoadTables                    EQU        0
  40. cmCalculateData                    EQU        1
  41. ;  –––––––––––––––––––––––––––––––––––––– table data for acceleration component 
  42. CMAccelerationTableData    RECORD 0
  43. inputLutEntryCount         ds.l    1                ; offset: $0 (0)        ;  count of entries for input lut for one dimension
  44. inputLutWordSize         ds.l    1                ; offset: $4 (4)        ;  count of bits of each entry ( e.g. 16 for WORD )
  45. inputLut                 ds.l    1                ; offset: $8 (8)        ;  handle to input lut
  46. outputLutEntryCount         ds.l    1                ; offset: $C (12)        ;  count of entries for output lut for one dimension    
  47. outputLutWordSize         ds.l    1                ; offset: $10 (16)        ;  count of bits of each entry ( e.g. 8 for BYTE )
  48. outputLut                 ds.l    1                ; offset: $14 (20)        ;  handle to output lut
  49. colorLutInDim             ds.l    1                ; offset: $18 (24)        ;  input dimension  ( e.g. 3 for LAB ; 4 for CMYK )
  50. colorLutOutDim             ds.l    1                ; offset: $1C (28)        ;  output dimension ( e.g. 3 for LAB ; 4 for CMYK )
  51. colorLutGridPoints         ds.l    1                ; offset: $20 (32)        ;  count of gridpoints for color lut ( for one Dimension )    
  52. colorLutWordSize         ds.l    1                ; offset: $24 (36)        ;  count of bits of each entry ( e.g. 8 for BYTE )
  53. colorLut                 ds.l    1                ; offset: $28 (40)        ;  handle to color lut
  54. inputColorSpace             ds.l    1                ; offset: $2C (44)        ;  packing info for input
  55. outputColorSpace         ds.l    1                ; offset: $30 (48)        ;  packing info for output
  56. userData                 ds.l    1                ; offset: $34 (52)
  57. reserved1                 ds.l    1                ; offset: $38 (56)
  58. reserved2                 ds.l    1                ; offset: $3C (60)
  59. reserved3                 ds.l    1                ; offset: $40 (64)
  60. reserved4                 ds.l    1                ; offset: $44 (68)
  61. reserved5                 ds.l    1                ; offset: $48 (72)
  62. sizeof                     EQU *                    ; size:   $4C (76)
  63.                         ENDR
  64. ; typedef struct CMAccelerationTableData * CMAccelerationTableDataPtr
  65.  
  66. ; typedef CMAccelerationTableDataPtr *    CMAccelerationTableDataHdl
  67.  
  68. ;  –––––––––––––––––––––––––––––––––––––– calc data for acceleration component 
  69. CMAccelerationCalcData    RECORD 0
  70. pixelCount                 ds.l    1                ; offset: $0 (0)        ;  count of input pixels
  71. inputData                 ds.l    1                ; offset: $4 (4)        ;  input array
  72. outputData                 ds.l    1                ; offset: $8 (8)        ;  output array
  73. reserved1                 ds.l    1                ; offset: $C (12)
  74. reserved2                 ds.l    1                ; offset: $10 (16)
  75. sizeof                     EQU *                    ; size:   $14 (20)
  76.                         ENDR
  77. ; typedef struct CMAccelerationCalcData * CMAccelerationCalcDataPtr
  78.  
  79. ; typedef CMAccelerationCalcDataPtr *    CMAccelerationCalcDataHdl
  80.  
  81. ;
  82. ; ———————————————————————————————————————————————————————————————————————————————————————————————— 
  83. ;                A c c e l e r a t i o n   C o m p o n e n t   I n t e r f a c e s
  84. ; ———————————————————————————————————————————————————————————————————————————————————————————————— 
  85. ;
  86. ;
  87. ; pascal CMError CMAccelerationLoadTables(ComponentInstance CMSession, CMAccelerationTableDataPtr tableData)
  88. ;
  89.     IF ¬ GENERATINGCFM THEN
  90.         Macro
  91.         _CMAccelerationLoadTables
  92.             dc.w                $2F3C
  93.             dc.w                $0004
  94.             dc.w                $0000
  95.             moveq               #0,d0
  96.             dc.w                $A82A
  97.         EndM
  98.     ELSE
  99.         IMPORT_CFM_FUNCTION CMAccelerationLoadTables
  100.     ENDIF
  101.  
  102. ;
  103. ; pascal CMError CMAccelerationCalculateData(ComponentInstance CMSession, CMAccelerationCalcDataPtr calcData)
  104. ;
  105.     IF ¬ GENERATINGCFM THEN
  106.         Macro
  107.         _CMAccelerationCalculateData
  108.             dc.w                $2F3C
  109.             dc.w                $0004
  110.             dc.w                $0001
  111.             moveq               #0,d0
  112.             dc.w                $A82A
  113.         EndM
  114.     ELSE
  115.         IMPORT_CFM_FUNCTION CMAccelerationCalculateData
  116.     ENDIF
  117.  
  118.     ENDIF ; __CMACCELERATION__ 
  119.  
  120.